from django.test import TestCase

# Create your tests here.

import re
ret=re.match(r"^1[35678]\d{9}$",'17730804936')
if ret:
    print('手机号正确')
else:
    print('手机号错误')


year = 2020
month = 5
day = 21
#列举所有月份天数
days=[31,28,31,30,31,30,31,31,30,31,30,31]
#默认天数
count = 0
for i in range(month-1):
    count +=days[i]
count +=day
print(count)

year = int(input("请输入年分："))
month = int(input("请输入月份："))
day = int(input("请输入日："))

print("-" * 20)
day += (month - 1) * 30
if month < 9:
    day += month // 2
else:
    day += (month + 1) // 2

if month > 2:
    if year % 400 == 0 or year % 4 == 0 and year % 100 != 0:
        day -= 1
    else:
        day -= 2
print("是一年的第%d天" % day)
